package com.luoran.bartalks.service.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.luoran.bartalks.dao.IBtRegionDao;
import com.luoran.bartalks.entity.biz.BtRegion;
import com.luoran.bartalks.service.IBtRegionService;

@Service
public class BtRegionService implements IBtRegionService{

	@Autowired
	private IBtRegionDao dao;

	@Override
	public List<BtRegion> getRegionByCompanyId(String companyId) {
		return dao.getRegionByCompanyId(companyId);
	}

	@Override
	public BtRegion getRegionByRegCode(String regionCode, String companyId) {
		return dao.getRegionByRegCode(regionCode, companyId);
	}

	@Override
	public BtRegion getRegionById(String id) {
		return dao.single(id);
	}

	@Override
	public BtRegion addRegion(BtRegion btRegion) {
		dao.insert(btRegion);
		return btRegion;
	}

	@Override
	public void updateRegById(BtRegion btRegion) {
		dao.updateRegById(btRegion);
	}

	@Override
	public void deleteRegById(BtRegion btRegion) {
		dao.deleteRegById(btRegion);
	}

	@Override
	public BtRegion getRegionByRegionCode(String regioncode) {
		return dao.getRegionByRegionCode(regioncode);
	}

	@Override
	public List<BtRegion> getTreeList(String companyId) {
		return dao.getTreeList(companyId);
	}


	


}
